@import "compass/reset";
@import "compass/css3/border-radius";
@import "compass/css3/transition";
@import "compass/css3/box-sizing";


@import url("http://fast.fonts.net/t/1.css?apiType=css&projectid=3af16084-ba56-49ca-b37d-0b49b59e1927");
@font-face {
  font-family: 'staticregular';
  src: font-url('//cartodb-assets.global.ssl.fastly.net/odyssey.js/static-webfont.eot');
  src: font-url('//cartodb-assets.global.ssl.fastly.net/odyssey.js/static-webfont.eot?#iefix') format('embedded-opentype'),
       font-url('//cartodb-assets.global.ssl.fastly.net/odyssey.js/static-webfont.woff') format('woff'),
       font-url('//cartodb-assets.global.ssl.fastly.net/odyssey.js/static-webfont.ttf') format('truetype'),
       font-url('//cartodb-assets.global.ssl.fastly.net/odyssey.js/static-webfont.svg#staticregular') format('svg');
  font-weight: normal;
  font-style: normal;
}

body{
  text-align: center;
  margin: 0; padding: 0;
  overflow: hidden;
  font-family: Helvetica;
  background: #EEE;
}

#template {
  position: absolute;
  top: 0;
  left: 0;
  width:100%;
  height: 100%;
}


.h-valign {
    &:before {
    content:"";
    display: inline-block;
    height: 100%;
    width: 1px;
    vertical-align: middle;
    margin-left: -5px;
  }
}

.splash {
  position: absolute;
  z-index: 11;
  top: 0; bottom: 0; left: 0; right: 0;
  background: #000;
  background: rgba(0, 0, 0, 0.9);
  text-align: center;
  min-width: 800px;
  .share_template {
    background: #fff;
    padding: 40px;
    width: 500px;
    border-radius: 4px;
    margin-top: 20px;
    text-align: center;
    textarea {
      border: 0;
      width: 100%;
      font: 14px Helvetica, Arial;
      color: #666;
      height: auto;
      margin-bottom: 40px
    }
  }

  .splash_inner, .inner-template {
    display: inline-block;
    vertical-align: middle;
  }

  .splash_inner {
    position: relative;
  }
  .inner-template { margin: 0 30px}

  .closeButton {
    position: absolute;
    top: 11px; right: 11px;
    font-weight: 200;
    color: rgba(255, 255, 255, .7);
    text-decoration: none;

    &:hover {
      color: #fff;
    }
  }

  h1 {
    font:  31px 'staticregular';
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 8px;
  }
  p {
    font: normal 19px 'staticregular';
    color: #AEAEAE;
    color: rgba(255, 255, 255, .7);
    margin-bottom: 10px;

    &.last {
      margin-bottom: 80px;
    }
 
    a {
      color: #AEAEAE;
      color: rgba(255, 255, 255, .7);
    }
  }



  .template_list {
    .button-template {
      display: inline-block;
      margin-top: 2px;
      border: 2px solid #EC6258;
      padding: 6px 16px;
      color: #EC6258;
      border-radius: 4px;
      @include transition(all .15s ease-in-out);
      text-decoration: none;
      outline: none;
      cursor: pointer;
      font: normal 19px 'staticregular';
      text-transform: uppercase;

      &:hover,
      &.zeroclipboard-is-hover {
        background: #EC6258;
        color: #fff;
      }
    }

    > li {
      position: relative;
      width: 290px;
      height: 140px;
      padding: 125px 0 30px;
      color: #444;
      background: #fff;
      border-radius: 4px;
      display: inline-block;
      margin-left: 20px;
      margin-bottom: 10px;
      text-align: center;


      p { color: #444; font: normal 19px 'staticregular'; margin: 0 0 20px 0; }

      .anim {
        display: block;
        position: absolute;
        top: -35px;
        left: 50%;
        margin-left: -90px;
        width: 180px;
        height: 134px;
      }

      &:first-child { margin: 0; }
    }
  }

}

#copy-button {
  width: 65px;
}

#editor_modal {
  background: #fff;
  position: absolute;
  right: 40px;
  top: 40px;
  bottom: 80px;
  width: 452px;
  text-align: left;
  box-shadow: 0 0 6px rgba(0, 0, 0, .2);
  min-height: 330px;

  @include border-radius(4px, 4px);

  &.expanded{
    width: 720px;
  }

  .error {
    text-align:center;
    background-color: #FFCCCC;
    color: #F00;
    position: absolute;
    padding: 10px;
    z-index: 2;
    font-size: 12px;
    letter-spacing: 0;
    right: 0;
    left: 0;
    bottom: 0;
    border-top:1px solid rgba(0, 0, 0, .05);
    padding: 20px;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
  }

	div.header {
    position: relative;
    background: rgb(255, 115, 115);
	  color: white;
	  line-height: 1em;
	  margin: 0;
	  padding: 22px 20px 20px 16px;
    @include border-top-radius(4px);

    a.expandButton{
      background: transparent image-url("expandButtonIcon.png") no-repeat 0 0;
      padding: 4px 13px;
      z-index: 1;
      position: relative;
      cursor: pointer;

      &:hover{
        background-position: 0 -28px;
      }

      &.expanded{
        background-position: -27px 0;

        &:hover{
          background-position: -27px -28px;
        }
      }
    }

    h1{
      display: inline;
      width: auto;
      margin: 0 0 0 35px;
      font: 19px 'staticregular';
      text-transform: uppercase;
    }

    #show_slide {
      position: absolute;
      top: 22px;
      right: 20px;
      font: 14px 'staticregular';
      cursor: pointer;
      display: inline-block;
      border-radius: 4px;
      color: #FFF;
      text-decoration: none;

      &:after {
        content:"";
        display: inline-block;
        width: 25px;
        height: 26px;
        vertical-align: middle;
        background: image-url("EditButtonIcon.png") no-repeat 0 0;
        margin-left: 8px;
        opacity: .6;
      }
      &:hover:after {
        opacity: 1;
      }
    }
	}

  #actions_bar {
    position: absolute;
    left: 0;
    width: 55px;
    top: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .05);
    border-right: 1px solid rgba(0, 0, 0, .15);

    &:before {
      content:"";
      position: absolute;
      top: 66px;
      right: 0;
      left: 0;
      height: 20px;
      background: -webkit-gradient(linear, left bottom, left top, color-stop(0%,rgba(0, 0, 0, 0)), color-stop(100%,rgba(0, 0, 0, 0.05))); /* Chrome,Safari4+ */
      background: linear-gradient(to top,  rgba(#f2f2f2, 0) 0%,rgba(#f2f2f2, 1) 100%); /* W3C */
      filter: progid:DXImageTransform.Microsoft.gradient(endColorstr='#f2f2f2', startColorstr='#00f2f2f2', GradientType=0 ); /* IE6-9 */
      z-index: 3;
      pointer-events: none;
    }

    &:after {
      content:"";
      position: absolute;
      bottom: 53px;
      right: 0;
      left: 0;
      height: 20px;
      background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0, 0, 0, 0)), color-stop(100%,rgbargba(0, 0, 0, 0.05))); /* Chrome,Safari4+ */
      background: linear-gradient(to bottom,  rgba(#f2f2f2, 0) 0%,rgba(#f2f2f2, 1) 100%); /* W3C */
      filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00f2f2f2', endColorstr='#f2f2f2', GradientType=0 ); /* IE6-9 */
      z-index: 3;
      pointer-events: none;
    }

    &.collapseActions {
      &:before,
      &:after {
        display: none;
      }
    }
  }

  textarea, .CodeMirror {
    position: absolute;
    top: 66px;
    bottom: 53px;
    left: 0;
    right: 0;
    height: auto;
    color: rgba(0,0,0,0.9);
    background: transparent;
    font-family: monospace;
    font-size: 14px;
    padding: 20px 20px 20px 72px;
    overflow-x: hidden;
  }
  .CodeMirror:after {
    content:"";
    position: absolute;
    bottom: 0;
    right: 0;
    left: 56px;
    height: 20px;
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0)), color-stop(10%,rgba(255,255,255,0)), color-stop(30%,rgba(255,255,255,1)), color-stop(100%,rgba(255,255,255,1))); /* Chrome,Safari4+ */
    background: linear-gradient(to bottom,rgba(255,255,255,0) 0%,rgba(255,255,255,0) 10%,rgba(255,255,255,1) 30%,rgba(255,255,255,1) 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00ffffff', endColorstr='#ffffff',GradientType=0 ); /* IE6-9 */
    z-index: 2;
    pointer-events: none;
  }

  .CodeMirror:before {
    content:"";
    position: absolute;
    top: 0;
    right: 0;
    left: 56px;
    height: 30px;
    background: -webkit-gradient(linear, left bottom, left top, color-stop(0%,rgba(255,255,255,0)), color-stop(10%,rgba(255,255,255,0)), color-stop(30%,rgba(255,255,255,1)), color-stop(100%,rgba(255,255,255,1))); /* Chrome,Safari4+ */
    background: linear-gradient(to top, rgba(255,255,255,0) 0%,rgba(255,255,255,0) 10%,rgba(255,255,255,1) 30%,rgba(255,255,255,1) 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient(endColorstr='#ffffff', startColorstr='#00ffffff', GradientType=0 ); /* IE6-9 */
    z-index: 3;
    pointer-events: none;
  }

  .CodeMirror-scroll {
    padding-bottom: 45px;
  }

  .actionButton {
    position: absolute;
    background-color: rgb(209, 209, 209);
    padding: 2px 3px 1px 3px;
    @include border-radius(2px, 2px);
    color: #FFF;
    font-size: 8px;
    text-transform: uppercase;

    &:hover{
      background-color: rgb(175, 175, 175);
      cursor: pointer;
    }
  }
}

#actionDropdown {
  position: relative;
  min-width: 150px;
  z-index: 20;
  text-align: left;
  border-radius: 4px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.15);
  background: #fff;
  border: 1px solid #B7B7B7;
  padding: 0 10px;
  color:#666;

  &:before {
    content: "";
    position: absolute;
    width: 0px;
    height: 0;
    left: 15px;
    top: -16px;
    border: 8px solid transparent;
    border-bottom: 8px solid #fff;
    z-index: 1
  }
  &:after {
    content: "";
    position: absolute;
    width: 0px;
    height: 0;
    left: 15px;
    top: -17px;
    border: 8px solid transparent;
    border-bottom: 8px solid #B7B7B7;
  }

  li:last-child {
    border-bottom: 0px;
    padding-bottom:10px;
  }
  li {
    list-style: none;
    border-bottom: 1px solid #EDEDED;
    padding: 10px 0;
    font-size: 12px;
    &:hover {
      cursor: pointer;
      color:#000;
    }
  }
  li:first-child {
    padding-top: 10px; 
    
  }
  li:last-child {
    border-bottom: 0px;
    margin: 0;
  }


  &.drop-top  {
    &:before {
      border-bottom: 8px solid transparent;
      border-top: 8px solid #fff;
      top: auto;
      left: 15px;
      bottom: -16px;
    }
    &:after {
      border-bottom: 8px solid transparent;
      border-top: 8px solid #B7B7B7;
      top: auto;
      left: 15px;
      bottom: -17px;
    }
  }

  img {
    height: 28px;
    width: 28px;
    margin-right: 10px;
    @include border-radius(2px);
  }

  span {
    line-height: 28px;
    vertical-align: top;
  }
}


.options {
  background: rgba(0, 0, 0, .02);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 8px 12px;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  .h-left {
    float: left;

    li {
      margin-left: 20px;
    }
  }
  .h-right { float: right; }
  li {
    display: inline-block;
    margin-left: 8px;
    &:first-child { margin: 0;}
  }

  a,
  div {
    display: inline-block;
    width: 33px;
    height: 33px;
    display: inline-block;
    opacity: .8;
    z-index: 1;
    cursor: pointer;
    -webkit-transition: opacity .5s;
    transition: opacity .5s;

    &:hover {
      opacity: 1;
    }

    img {
      width: 100%;
    }
  }
}

a.basemapSelector {
  width: auto;
  text-decoration: none;
  font-size: 13px;
  line-height: 31px;
  color: #ababab;
  text-decoration: none;

  img {
    height: 31px;
    width: 31px;
    border: 2px solid rgba(#000,.15);
    @include box-sizing(border-box);
    @include border-radius(2px);
  }

  span {
    vertical-align: top;
    line-height: 33px;
    margin-left: 8px;
  }
}

a.downloadButton{
  background: transparent image-url("downloadButtonIcon.png") no-repeat 0 0;
}

a.helpButton{
  background: transparent image-url("helpButtonIcon.png") no-repeat 0 0;
}

a.shareButton{
  background: transparent image-url("shareButtonIcon.png") no-repeat 0 0;
}

a.collapseButton{
  background: transparent image-url("collapseButtonIcon.png") no-repeat 0 0;
}

a.expandButton{
  background: transparent image-url("expandToogleButtonIcon.png") no-repeat 0 0;
}

.shareInput {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  border: 1px solid #ddd;
  margin: 0;
  padding: 5px;
  outline: none;
  height: 31px;
  font: 14px/31px Helvetica, Arial;
  @include border-radius(4px);
  color: #333;
  @include transition(all .15s ease-in-out);

  &:focus {
    border: 1px solid #ccc;
  }
}

.input_field {
  position: relative;
  display: inline-block;
  float: left;
  width: 360px;
  height: 48px;
  margin-right: 10px;
}

.mode_menu {
  position: absolute;
  top: 2px; right: -10px;
  width: 115px;
  background: #fff;

  li {
    &.first a {
      @include border-right-radius(3px);
    }

    &.last a {
      @include border-left-radius(3px);
    }

    &.selected a,
    a:hover {
      background: #EC6258;
      color: #fff;
    }

    &.selected a:hover {
      background: darken(#EC6258, 5%);
    }
  }

  a {
    display: block;
    float: right;
    width: 55px;
    margin-left: 1px;
    font-weight: bold;
    font-size: 11px;
    line-height: 39px;
    text-transform: uppercase;
    text-decoration: none;
    background: #eee;
    color: #FF7373;
    @include transition(all .15s ease-in-out);
  }
}